# Maintainer: Erich Gubler <erichdongubler@gmail.com>

pkgname=moreutils
pkgver=0.63
pkgrel=1
pkgdesc="A growing collection of the unix tools that nobody thought to write thirty years ago"
arch=('i686' 'x86_64')
url="https://joeyh.name/code/moreutils/"
license=('GPL2')
makedepends=('docbook-xml' 'git')
source=("git+https://git.joeyh.name/git/moreutils.git#tag=${pkgver}")
sha256sums=('SKIP')

build() {
  cd "${srcdir}"/${pkgname}
  make DOCBOOKXSL="$(ls -d /usr/share/xml/docbook/xsl-stylesheets-* | tail --lines=1)"
  rename .exe '' *.exe
}

package() {
  cd "${srcdir}"/${pkgname}
  make PREFIX="${pkgdir}"/usr install
  # Conflict with parallel package
  rm -f "${pkgdir}"/usr/share/man/man1/parallel.1
}
